import request from '../utils/request'

// 分页查询核算单元
export function listAccountingUnitByPage(params) {
  return request({
    url: '/sysAccountingUnit/listAccountingUnitByPage',
    method: 'post',
    data: params
  })
}

// 院区下拉框
export function listHospitalArea(params) {
  return request({
    url: '/sysAccountingUnit/listHospitalArea',
    method: 'get',
    params
  })
}

// 类别下拉框
export function categoryDropDown(params) {
  return request({
    url: '/sysAccountingUnit/categoryDropDown',
    method: 'get',
    params
  })
}

// 保存或编辑核算单元
export function saveOrUpdate(params) {
  return request({
    url: '/sysAccountingUnit/saveOrUpdate',
    method: 'post',
    data: params
  })
}

// 删除核算单元
export function removeAccountingById(params) {
  return request({
    url: '/sysAccountingUnit/removeAccountingById',
    method: 'get',
    params
  })
}

// 导出和下载模板
export function getExport(params) {
  return request({
    url: '/sysAccountingUnit/export',
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}

// 导入
export function getImportExcel(params) {
  return request({
    url: '/sysAccountingUnit/importExcel',
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}
